<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>评论模块</title>
  <link rel="stylesheet" href="/admin/assets/lib/layui/css/layui.css">
  <link rel="stylesheet" href="./css/comment.css">
</head>
<body>

  <div class="layui-card">
    <div class="layui-card-header header">
      评论管理
    </div>
    <div class="layui-card-body">
      <table class="layui-table">
        <colgroup>
          <col width="100">
          <col width="350">
          <col width="450">
          <col>
          <col>
        </colgroup>
        <thead>
          <tr>
            <th>ID</th>
            <th>评论人</th>
            <th>评论内容</th>
            <th>评论时间</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody id="tb">
          <!-- <tr>
            <td>贤心</td>
            <td>2016-11-29</td>
            <td>人生就像是一场修行</td>
            <td>人生就像是一场修行</td>
            <td>人生就像是一场修行</td>
          </tr> -->
        </tbody>
      </table>
    </div>
  </div>

  <!-- 创建template模板 -->
  <script type="text/html" id="template">
  {{each data v i}}
  <tr>
    <td>{{v.id}}</td>
    <td>{{v.uname}}</td>
    <td>{{v.content}}</td>
    <td>{{v.cdate | getTime}}</td>
    <td><button type="button" class="layui-btn layui-btn-danger layui-btn-xs delBtn" data-id="{{v.id}}">删除</button></td>
  </tr>
  {{/each}}
</script>

  <!-- 导入相关js文件 -->
  <script src="/admin/assets/lib/jquery.js"></script>
  <script src="/admin/assets/js/common.js"></script>
  <script src="/admin/assets/lib/layui/layui.all.js"></script>
  <script src="/admin/assets/lib/template-web.js"></script>

  <!-- 导入自己的主页js文件 -->
  <script src="/admin/assets/js/source/comment.js"></script>
</body>
</html>